Skip to main content

M-Pesa Statement Analysis

POST https://api.manka.tz/api/v1/analysis/3d

This analyses the pdf and generates the report. The response is in a json format.

Header Requirements

  • Authorization --required

Body Params

  • file --required
  • fullname --required
curl example request
curl -X 'POST' 'https://api.manka.tz/api/v1/analysis/3d'
-F fullname=Hussein \
-F 'file=@M_Pesa_789981_Statement.pdf' \
-H 'Authorization: Bearer XXXXXXXXXXX' \'

Response Sample

  1. Status OK Response
200 OK
{
"analysis_period": {
"start_date": "June_2024",
"end_date": "October_2024"
},
"cash_flow_analysis": {
"cash_inflow": [
{
"month": "June_2024",
"amount": 1290626.0,
"percentage": 5.95
},
{
"month": "July_2024",
"amount": 3902031.0,
"percentage": 18.0
},
{
"month": "August_2024",
"amount": 1321253.0,
"percentage": 6.1
},
{
"month": "September_2024",
"amount": 8294939.0,
"percentage": 38.27
},
{
"month": "October_2024",
"amount": 6867528.0,
"percentage": 31.68
}
],
"cash_outflow": [
{
"month": "June_2024",
"amount": 1272677.0,
"percentage": 5.95
},
{
"month": "July_2024",
"amount": 3842583.0,
"percentage": 17.97
},
{
"month": "August_2024",
"amount": 1295249.0,
"percentage": 6.06
},
{
"month": "September_2024",
"amount": 8174942.0,
"percentage": 38.23
},
{
"month": "October_2024",
"amount": 6798616.0,
"percentage": 31.79
}
]
},
"agent_activity_analysis": {
"agent_withdrawal": [
{
"month": "June_2024",
"amount": 0.0,
"percentage": 0.0
},
{
"month": "July_2024",
"amount": 422000.0,
"percentage": 67.79
},
{
"month": "August_2024",
"amount": 48000.0,
"percentage": 7.71
},
{
"month": "September_2024",
"amount": 144500.0,
"percentage": 23.21
},
{
"month": "October_2024",
"amount": 8000.0,
"percentage": 1.29
}
],
"agent_deposit": [
{
"month": "June_2024",
"amount": 200000.0,
"percentage": 4.39
},
{
"month": "July_2024",
"amount": 0.0,
"percentage": 0.0
},
{
"month": "August_2024",
"amount": 0.0,
"percentage": 0.0
},
{
"month": "September_2024",
"amount": 3760000.0,
"percentage": 82.46
},
{
"month": "October_2024",
"amount": 600000.0,
"percentage": 13.16
}
]
},
"peer_to_peer_activity_analysis": {
"p2p_sent": [
{
"month": "June_2024",
"amount": 218500.0,
"percentage": 8.13
},
{
"month": "July_2024",
"amount": 115000.0,
"percentage": 4.28
},
{
"month": "August_2024",
"amount": 0.0,
"percentage": 0.0
},
{
"month": "September_2024",
"amount": 1748000.0,
"percentage": 65.04
},
{
"month": "October_2024",
"amount": 606000.0,
"percentage": 22.55
}
],
"p2p_received": [
{
"month": "June_2024",
"amount": 200000.0,
"percentage": 2.88
},
{
"month": "July_2024",
"amount": 1157576.0,
"percentage": 16.67
},
{
"month": "August_2024",
"amount": 278000.0,
"percentage": 4.0
},
{
"month": "September_2024",
"amount": 484112.0,
"percentage": 6.97
},
{
"month": "October_2024",
"amount": 4825000.0,
"percentage": 69.48
}
]
},
"bank_activity_analysis": {
"wallet_to_bank": [
{
"month": "June_2024",
"amount": 0.0,
"percentage": 0.0
},
{
"month": "July_2024",
"amount": 0.0,
"percentage": 0.0
},
{
"month": "August_2024",
"amount": 0.0,
"percentage": 0.0
},
{
"month": "September_2024",
"amount": 90000.0,
"percentage": 40.0
},
{
"month": "October_2024",
"amount": 135000.0,
"percentage": 60.0
}
],
"bank_to_wallet": [
{
"month": "June_2024",
"amount": 352500.0,
"percentage": 11.73
},
{
"month": "July_2024",
"amount": 567000.0,
"percentage": 18.87
},
{
"month": "August_2024",
"amount": 202999.0,
"percentage": 6.75
},
{
"month": "September_2024",
"amount": 1845000.0,
"percentage": 61.39
},
{
"month": "October_2024",
"amount": 38000.0,
"percentage": 1.26
}
]
},
"loan_activity_analysis": {
"songesha": [
{
"month": "June_2024",
"amount": 568277.0,
"percentage": 9.93
},
{
"month": "July_2024",
"amount": 1418362.0,
"percentage": 24.79
},
{
"month": "August_2024",
"amount": 694349.0,
"percentage": 12.13
},
{
"month": "September_2024",
"amount": 1760242.0,
"percentage": 30.76
},
{
"month": "October_2024",
"amount": 1281126.0,
"percentage": 22.39
}
],
"mpawa": [
{
"month": "June_2024",
"amount": 0.0,
"percentage": 0.0
},
{
"month": "July_2024",
"amount": 0.0,
"percentage": 0.0
},
{
"month": "August_2024",
"amount": 0.0,
"percentage": 0.0
},
{
"month": "September_2024",
"amount": 0.0,
"percentage": 0.0
},
{
"month": "October_2024",
"amount": 0.0,
"percentage": 0.0
}
],
"chomoka": [
{
"month": "June_2024",
"amount": 0.0,
"percentage": 0.0
},
{
"month": "July_2024",
"amount": 0.0,
"percentage": 0.0
},
{
"month": "August_2024",
"amount": 0.0,
"percentage": 0.0
},
{
"month": "September_2024",
"amount": 0.0,
"percentage": 0.0
},
{
"month": "October_2024",
"amount": 0.0,
"percentage": 0.0
}
],
"mgodi": [
{
"month": "June_2024",
"amount": 0.0,
"percentage": 0.0
},
{
"month": "July_2024",
"amount": 0.0,
"percentage": 0.0
},
{
"month": "August_2024",
"amount": 0.0,
"percentage": 0.0
},
{
"month": "September_2024",
"amount": 0.0,
"percentage": 0.0
},
{
"month": "October_2024",
"amount": 0.0,
"percentage": 0.0
}
]
},
"bills_activity_analysis": {
"bill_payment": [
{
"month": "June_2024",
"amount": 266500.0,
"percentage": 4.33
},
{
"month": "July_2024",
"amount": 1063500.0,
"percentage": 17.29
},
{
"month": "August_2024",
"amount": 334200.0,
"percentage": 5.43
},
{
"month": "September_2024",
"amount": 886000.0,
"percentage": 14.41
},
{
"month": "October_2024",
"amount": 3599500.0,
"percentage": 58.53
}
],
"luku": [
{
"month": "June_2024",
"amount": 15000.0,
"percentage": 17.65
},
{
"month": "July_2024",
"amount": 30000.0,
"percentage": 35.29
},
{
"month": "August_2024",
"amount": 0.0,
"percentage": 0.0
},
{
"month": "September_2024",
"amount": 40000.0,
"percentage": 47.06
},
{
"month": "October_2024",
"amount": 0.0,
"percentage": 0.0
}
],
"gepg": [
{
"month": "June_2024",
"amount": 0.0,
"percentage": 0.0
},
{
"month": "July_2024",
"amount": 0.0,
"percentage": 0.0
},
{
"month": "August_2024",
"amount": 0.0,
"percentage": 0.0
},
{
"month": "September_2024",
"amount": 0.0,
"percentage": 0.0
},
{
"month": "October_2024",
"amount": 0.0,
"percentage": 0.0
}
]
},
"lipa_info_analysis": {
"lipa": [
{
"month": "June_2024",
"amount": 126400.0,
"percentage": 5.56
},
{
"month": "July_2024",
"amount": 730900.0,
"percentage": 32.14
},
{
"month": "August_2024",
"amount": 178200.0,
"percentage": 7.84
},
{
"month": "September_2024",
"amount": 993200.0,
"percentage": 43.68
},
{
"month": "October_2024",
"amount": 245100.0,
"percentage": 10.78
}
]
},
"other_analysis": {
"other": [
{
"month": "June_2024",
"amount": 0.0,
"percentage": 0.0
},
{
"month": "July_2024",
"amount": 881885.0,
"percentage": 48.27
},
{
"month": "August_2024",
"amount": 225000.0,
"percentage": 12.32
},
{
"month": "September_2024",
"amount": 590000.0,
"percentage": 32.3
},
{
"month": "October_2024",
"amount": 130000.0,
"percentage": 7.12
}
]
}
}